package com.zb.store.controller;

import com.zb.result.PageUtil;
import com.zb.result.Result;
import com.zb.service.ZjStoreGoodsStockService;
import com.zb.vo.GoodsStockSelectVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * @Author WEN
 * @Date 2024/1/7 0007
 **/
@Api(tags = "仓库商品库存类接口")
@RestController
@RequestMapping("/store/goods/stock")
public class zjStoreGoodsStockController {
    @Resource
    private ZjStoreGoodsStockService storeGoodsStockService;

    @ApiOperation("获取商品库存")
    @PostMapping("/getGoodsStock")
    public Result getGoodsStock(@RequestBody @Valid GoodsStockSelectVo selectVo) {
        return Result.success().data(PageUtil.row(storeGoodsStockService.getGoodsStock(selectVo)));
    }
}
